# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dns2tcp
pkgver=0.5.2
pkgrel=7
groups=('blackarch' 'blackarch-tunnel')
pkgdesc='A tool for relaying TCP connections over DNS.'
arch=('x86_64' 'aarch64')
url='http://www.hsc.fr/ressources/outils/dns2tcp/index.html.en'
license=('GPL-1.0-only')
source=("https://web.archive.org/web/20160329175054/http://www.hsc.fr/ressources/outils/dns2tcp/download/$pkgname-$pkgver.tar.gz")
sha512sums=('2f8dfb671853374be0aa8105f22456ae56d9e56fc270475740ab8704d1e202abe34faf36a25d820283aa672c8d2d1f168907537f4fede115e1935a0920570584')

build() {
  cd "$pkgname-$pkgver"

  if [[ "$CARCH" == "i686" || "$CARCH" == "x86_64" ]];
  then
    ./configure --prefix=/usr
  else
    ./configure --build=arm --prefix=/usr
  fi

  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
}

